package com.zhoudb.blog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhoudb.blog.dto.ArticleExt;
import com.zhoudb.blog.entity.Article;
import com.zhoudb.blog.mapper.ArticleMapper;
import com.zhoudb.blog.service.ArticleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 文章信息表 服务实现类
 * </p>
 *
 * @author zhoudb
 * @since 2018-10-06
 */
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public Page listPage(Page map, QueryWrapper query) {
        List<ArticleExt> cs=articleMapper.listPage(map,query);
        return map.setRecords(cs);
    }
}
